<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<c:url value='/css/estilos.css'/>"/>
<title>Adicionar Notificaci&oacuten</title>
</head>
<body>
	<header> <jsp:include page="items.jsp"></jsp:include> </header>

	<h1>Crear nueva notificaci&oacuten</h1>

	<c:url var="saveUrl" value="/notification/add?userCode=${currentUserCode}	" />

	<form:form modelAttribute="notificationAttribute" method="POST"
		action="${saveUrl}">
		<table>
			<tr>
				<td><form:label path="title">T&iacutetulo:</form:label></td>
				<td><form:input path="title" maxlength="50" size="50" /></td>
			</tr>

			<tr>
				<td><form:label path="dateString">Fecha:</form:label></td>
				<td><form:input path="dateString" type="date" name="dateString"/></td>
			</tr>

			<tr>
				<td><form:label path="notificationType">Tipo:</form:label></td>
				<td><form:select path="notificationType" id="notificationType">
						<form:options items="${notificationTypeList}" itemLabel="name"
							itemValue="code" />
					</form:select></td>
			</tr>

			<tr>
				<td><form:label path="shortDescription">Descripci&oacuten corta:</form:label></td>
				<td><form:input path="shortDescription" maxlength="50"
						size="50" /></td>
			</tr>

			<tr>
				<td><form:label path="longDescription">Descripci&oacuten larga:</form:label></td>
				<td><form:textarea path="longDescription" /></td>
			</tr>

			<tr>
				<td><form:label path="subjectCode">C&oacutedigo de Materia:</form:label></td>
				<td><form:input path="subjectCode"  size="50" /></td>
			</tr>


		</table>
		<input type="submit" value="Guardar" />
	</form:form>

</body>
</html>